public class SimCard {
    private String classify;  // 卡类型
    private int number;       // 卡号
    private String username;
    private String password;
    private int balance;      // 余额
    private int duration;     // 通话时长（Minute）
    private int surfData;     // 上网流量

    public SimCard() {
    }

    public SimCard(String classify, int number, String username, String password, int balance, int duration, int surfData) {
        setClassify(classify);
        setNumber(number);
        setUsername(username);
        setPassword(password);
        setBalance(balance);
        setDuration(duration);
        setSurfData(surfData);
    }

    public String getClassify() {
        return classify;
    }

    public void setClassify(String classify) {
        SimClassifyEnum big = SimClassifyEnum.BIGCARD;
        SimClassifyEnum small = SimClassifyEnum.SMALLCARD;
        SimClassifyEnum nano = SimClassifyEnum.NANOCARD;
        if (classify.equals(big.simclassify)||classify.equals(small.simclassify)
            ||classify.equals(nano.simclassify)) {
            this.classify = classify;
        } else {
            System.out.println("无效的卡类型");
        }

    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getBalance() {
        return balance;
    }

    public void setBalance(int balance) {
        this.balance = balance;
    }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    public int getSurfData() {
        return surfData;
    }

    public void setSurfData(int surfData) {
        this.surfData = surfData;
    }

    public void show() {
        System.out.println("卡号：" + getNumber() + " 用户名：" + getUsername() + " 余额：" + getBalance());
    }


}
